package com.yiyue.graduate.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yiyue.graduate.dao.UserMapper;
import com.yiyue.graduate.pojo.User;
import com.yiyue.graduate.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author yiyuexiaofusheng
 * @date 2021/1/22
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;


    @Override
    public User userLogin(User user) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("login_name", user.getLoginName());
        return userMapper.selectOne(queryWrapper);
    }
}
